﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Class này chứa các biến hằng số cho project
/// </summary>
public sealed class DRMConstants
{
    private DRMConstants()
    {
        //
        // private constructor for util class
        // temporaral do nothing
        //
    }


    #region String constants
    /// <summary>
    /// Value : 
    /// </summary>
    public static readonly string EMPTY_STRING = "";

    #region messages
    /// <summary>
    /// Value : Thêm mới {0} thành công!
    /// </summary>
    public static readonly string MESSAGE_ADD_SUCCESSFULL = "Thêm mới {0} thành công!";

    /// <summary>
    /// Value : Cập nhật {0} thành công!
    /// </summary>
    public static readonly string MESSAGE_UPDATE_SUCCESSFULL = "Cập nhật {0} thành công!";

    /// <summary>
    /// Value : Hệ thống đang bảo trì!
    /// </summary>
    public static readonly string MESSAGE_UNDER_CONSTRUCTION = "Hệ thống đang bảo trì!";

    /// <summary>
    /// Value : Không tìm thấy kết quả!
    /// </summary>
    public static readonly string MESSAGE_NO_RECORD_FOUND = "Không tìm thấy kết quả!";

    /// <summary>
    /// Value : Mời bạn chọn {0} để cập nhật thông tin!
    /// </summary>
    public static readonly string MESSAGE_NOT_SELECTED = "Mời bạn chọn {0} để cập nhật thông tin!";
    #endregion


    #region object names
    /// <summary>
    /// Value : sản phẩm
    /// </summary>
    public static readonly string OBJECT_NAME_PRODUCT = "sản phẩm";

    /// <summary>
    /// Value : ngành hàng
    /// </summary>
    public static readonly string OBJECT_NAME_CATEGORY = "ngành hàng";

    /// <summary>
    /// Value : kho hàng
    /// </summary>
    public static readonly string OBJECT_NAME_LOCATION = "kho hàng";

    /// <summary>
    /// Value : nhãn hiệu
    /// </summary>
    public static readonly string OBJECT_NAME_BRAND = "nhãn hiệu";

    /// <summary>
    /// Value : mặt hàng
    /// </summary>
    public static readonly string OBJECT_NAME_MAST = "mặt hàng";
    #endregion


    #region control names
    /// <summary>
    /// Value : lblMaSo
    /// </summary>
    public static readonly string CONTROL_NAME_LABEL_MASO = "lblMaSo";
    #endregion


    #region DB columns
    /// <summary>
    /// Value : CommodKey
    /// </summary>
    public static readonly string DB_COLUMN_CATEGORY_ID = "MaNganhHang";

    /// <summary>
    /// Value : Description
    /// </summary>
    public static readonly string DB_COLUMN_CATEGORY_DESC = "NganhHang";

    /// <summary>
    /// Value : MaNhanHieu
    /// </summary>
    public static readonly string DB_COLUMN_BRAND_ID = "MaNhanHieu";

    /// <summary>
    /// Value : NhanHieu
    /// </summary>
    public static readonly string DB_COLUMN_BRAND_DESC = "NhanHieu";

    /// <summary>
    /// Value : MaSoKho
    /// </summary>
    public static readonly string DB_COLUMN_LOCATION_ID = "MaSoKho";

    /// <summary>
    /// Value : Kho
    /// </summary>
    public static readonly string DB_COLUMN_LOCATION_DESC = "Kho";

    /// <summary>
    /// Value : TTPP
    /// </summary>
    public static readonly string DB_COLUMN_TTPP = "TTPP";

    /// <summary>
    /// Value : defaultKho
    /// </summary>
    public static readonly string DB_COLUMN_LOCATION_DEFAULT = "defaultKho";

    /// <summary>
    /// Value : MaHang
    /// </summary>
    public static readonly string DB_COLUMN_MAST_ID = "MaHang";

    /// <summary>
    /// Value : MatHang
    /// </summary>
    public static readonly string DB_COLUMN_MAST_DESC = "MatHang";

    /// <summary>
    /// Value : MaMoRong
    /// </summary>
    public static readonly string DB_COLUMN_MAST_EXTENDED_CODE = "MaMoRong";

    /// <summary>
    /// Value : DonVi
    /// </summary>
    public static readonly string DB_COLUMN_UNIT = "DonVi";

    /// <summary>
    /// Value : Gia
    /// </summary>
    public static readonly string DB_COLUMN_PRICE = "Gia";

    /// <summary>
    /// Value : PV
    /// </summary>
    public static readonly string DB_COLUMN_PV = "PV";

    /// <summary>
    /// Value : BV
    /// </summary>
    public static readonly string DB_COLUMN_BV = "BV";

    /// <summary>
    /// Value : TrangThai
    /// </summary>
    public static readonly string DB_COLUMN_STATUS = "TrangThai";

    /// <summary>
    /// Value : VAT
    /// </summary>
    public static readonly string DB_COLUMN_VAT = "VAT";

    /// <summary>
    /// Value : SanPham
    /// </summary>
    public static readonly string DB_COLUMN_PRODUCT = "MaSanPham";
    #endregion


    #region store procedure names
    /// <summary>
    /// Value : ls_searchCategory
    /// </summary>
    public static readonly string STOREPROC_NAME_SEARCH_ALL_CATEGORIES = "ls_searchCategory";

    /// <summary>
    /// Value : ls_getCategoryList
    /// </summary>
    public static readonly string STOREPROC_NAME_SEARCH_CATEGORIES = "ls_getCategoryList";

    /// <summary>
    /// Value : ls_saveCategory
    /// </summary>
    public static readonly string STOREPROC_NAME_SAVE_CATEGORY = "ls_saveCategory";

    /// <summary>
    /// Value : ls_getDetailCategory
    /// </summary>
    public static readonly string STOREPROC_NAME_GET_DETAIL_CATEGORY = "ls_getDetailCategory";

    /// <summary>
    /// Value : ls_searchItem
    /// </summary>
    public static readonly string STOREPROC_NAME_SEARCH_MASTS = "ls_searchItem";
    
    /// <summary>
    /// Value : ls_saveInmastInfo
    /// </summary>
    public static readonly string STOREPROC_NAME_SAVE_MAST = "ls_saveInmastInfo";

    /// <summary>
    /// Value : ls_getDetailItemInfo
    /// </summary>
    public static readonly string STOREPROC_NAME_GET_DETAIL_MAST = "ls_getDetailItemInfo";

    /// <summary>
    /// Value : ls_saveLocation
    /// </summary>
    public static readonly string STOREPROC_NAME_SAVE_LOCATION = "ls_saveLocation";

    /// <summary>
    /// Value : ls_getDetailBrand
    /// </summary>
    public static readonly string STOREPROC_NAME_GET_DETAIL_BRAND = "ls_getDetailBrand";
    
    /// <summary>
    /// Value : ls_searchBrand
    /// </summary>
    public static readonly string STOREPROC_NAME_SEARCH_ALL_BRANDS = "ls_searchBrand";   

    /// <summary>
    /// Value : ls_saveBrand
    /// </summary>
    public static readonly string STOREPROC_NAME_SAVE_BRAND = "ls_saveBrand";

    /// <summary>
    /// Value : ls_searchLocList
    /// </summary>
    public static readonly string STOREPROC_NAME_SEARCH_LOCATIONS = "ls_searchLocList";

    /// <summary>
    /// Value : ls_getDetailLocation
    /// </summary>
    public static readonly string STOREPROC_NAME_GET_DETAIL_LOCATION = "ls_getDetailLocation";
    #endregion


    #region store procedure parametters
    /// <summary>
    /// Value : @categoryID
    /// </summary>
    public static readonly string STOREPROC_PARAM_CATEGORY_ID = "@categoryID";

    /// <summary>
    /// Value : @content
    /// </summary>
    public static readonly string STOREPROC_PARAM_CONTENT = "@content";

    /// <summary>
    /// Value : @inclassID
    /// </summary>
    public static readonly string STOREPROC_PARAM_BRAND_ID = "@brandID";

    /// <summary>
    /// Value : @description
    /// </summary>
    public static readonly string STOREPROC_PARAM_DESC = "@description";

    /// <summary>
    /// Value : @mastID
    /// </summary>
    public static readonly string STOREPROC_PARAM_MAST_ID = "@mastID";

    /// <summary>
    /// Value : @locationID
    /// </summary>
    public static readonly string STOREPROC_PARAM_LOCATION_ID = "@locationID";

    /// <summary>
    /// Value : @barCode
    /// </summary>
    public static readonly string STOREPROC_PARAM_BARCODE = "@barCode";

    /// <summary>
    /// Value : @cvrtDesc
    /// </summary>
    public static readonly string STOREPROC_PARAM_UNIT = "@cvrtDesc";

    /// <summary>
    /// Value : @VATRate
    /// </summary>
    public static readonly string STOREPROC_PARAM_VAT_RATE = "@VATRate";

    /// <summary>
    /// Value : @productID
    /// </summary>
    public static readonly string STOREPROC_PARAM_PRODUCT = "@productID";

    /// <summary>
    /// Value : @price
    /// </summary>
    public static readonly string STOREPROC_PARAM_PRICE = "@price";

    /// <summary>
    /// Value : @status
    /// </summary>
    public static readonly string STOREPROC_PARAM_STATUS = "@status";

    /// <summary>
    /// Value : @TTPP
    /// </summary>
    public static readonly string STOREPROC_PARAM_TTPP = "@TTPP";

    /// <summary>
    /// Value : @isAddNew
    /// </summary>
    public static readonly string STOREPROC_PARAM_FLAG_IS_NEW = "@isAddNew";

    /// <summary>
    /// Value : @isDefault
    /// </summary>
    public static readonly string STOREPROC_PARAM_FLAG_IS_DEFAULT = "@isDefault";
    #endregion


    #region key words
    /// <summary>
    /// Value : New
    /// </summary>
    public static readonly string KEY_WORD_NEW = "New";
    #endregion


    #region command names
    /// <summary>
    /// Value : chon
    /// </summary>
    public static readonly string COMMAND_NAME_ROW_COMMAND = "chon";
    #endregion
    #endregion
}


enum InsertUpdateState
{
    Insert = 0,
    Update = 1
}